
'''
def bulid_person(first_name, last_name, age='None'):
    person = {'first':first_name,'last':last_name}
    if age:
        person['age'] = age
    return person
    
musician = bulid_person('jimi', 'hendrix',age=27)
print(musician)
'''
'''
#练习8-6
def city_country(city,country):
    return f"{city},{country}"
while True:
    city = input("请输入城市")
    if city == 'q':
        break
    country = input("请输入国家")
    if country == 'q':
        break
    x = city_country(city,country)
    print(x)
'''
'''
#8-7
def make_album(musician_name,music_name):
    music_info = {}
    music_info[musician_name] = music_name
    return music_info
while True:
    musician_name = input("作曲家")
    if musician_name == 'q':
        break
    music_name = input("专辑名")
    if music_name == 'q':
        break
    mixmusic = make_album(musician_name,music_name)
    print(mixmusic)
    
'''

#练习8-9
def show_messages(print_messages):
    for print_message in print_messages:
        print(print_message)
messages = ['message1','message2','mesage3']
show_messages(messages)

